package com.jhgsys.internal.workflow.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

/**
 * 流程节点审批人员表 Entity
 *
 * @author fenghaijun
 * @date 2024-07-19 09:18:03
 */
@Data
@TableName("workflow_node_review")
public class WorkflowNodeReview implements Serializable {

    /**
     * ID
     */
    @TableId(value = "workflow_node_review_id", type = IdType.ASSIGN_UUID)
    private String workflowNodeReviewId;

    /**
     * 租户Id
     */
    @TableField("tenant_id")
    @NotNull(message = "{required}")
    private String tenantId;

    /**
     * 流程id
     */
    @TableField("workflow_id")
    @NotNull(message = "{required}")
    private String workflowId;

    /**
     * 节点id
     */
    @TableField("workflow_node_id")
    @NotNull(message = "{required}")
    private String workflowNodeId;

    /**
     * 审批类型;1、指定人员  2、主管审批 3、指定角色  4：指定部门 5：自定义（系统集成Class返回审核人）
     */
    @TableField("workflow_node_check_type")
    @NotBlank(message = "{required}")
    @Size(max = 1, message = "{noMoreThan}")
    private String workflowNodeCheckType;

    /**
     * 人员Id/角色Id/部门Id/自定义实现类
     */
    @TableField("workflow_node_check_ids")
    @NotBlank(message = "{required}")
    @Size(max = 64, message = "{noMoreThan}")
    private String workflowNodeCheckIds;

    /**
     * 创建人
     */
    @TableField("created_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    /**
     * 更新人
     */
    @TableField("updated_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    /**
     * 删除人
     */
    @TableField("deleted_by")
    @Size(max = 64, message = "{noMoreThan}")
    private String deletedBy;

    /**
     * 删除时间
     */
    @TableField("deleted_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date deletedTime;

    /**
     * 删除标记
     */
    @TableField("deleted_flg")
    @Size(max = 1, message = "{noMoreThan}")
    private String deletedFlg;

}